package com.hxw.servicefeign.interfaces;

import com.hxw.servicefeign.impl.HelloSchedualService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.concurrent.ScheduledExecutorService;

/**
 * 定义一个feign接口，通过@ FeignClient（“服务名”），来指定调用哪个服务
 */
@Service
@FeignClient(value = "APPCLIENT",fallback = HelloSchedualService.class)
public interface IHelloSchedualService {
    @GetMapping(value = "/home")
    String sayHelloFromClientOne(@RequestParam(value = "name") String name);
}
